using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace Dracham.TileManagement.CharacterManagement.Animation
{
    public class Image:ICloneable
    {
        private Int32 x = default(Int32);
        private Int32 y = default(Int32);

        public Int32 X
        {
            get { return x; }
            set { x = value; }
        }

        public Int32 Y
        {
            get { return y; }
            set { y = value; }
        }


        private Image()
        {

        }

        public static Image FromXmlNode(XmlNode node)
        {
            Image i = new Image();

            i.x = Convert.ToInt32(node.Attributes["X"].Value);
            i.y = Convert.ToInt32(node.Attributes["Y"].Value);

            return i;
        }

        #region ICloneable Members

        public object Clone()
        {
            Image i = new Image();

            i.x = this.x;
            i.y = this.y;

            return i;
        }

        #endregion
    }
}
